package com.todod.base.module.infra.api.basegenerateno;

import cn.hutool.core.convert.Convert;
import com.fhs.trans.service.AutoTransable;
import com.todod.base.framework.common.pojo.CommonResult;
import com.todod.base.framework.common.util.collection.CollectionUtils;
import com.todod.base.module.infra.api.basegenerateno.dto.BaseGenerateNoRespDTO;
import com.todod.base.module.infra.enums.ApiConstants;
import feign.FeignIgnore;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@FeignClient(name = ApiConstants.NAME) // TODO ：fallbackFactory =
@Tag(name = "RPC 服务 - 系统生成编号", description = "系统生成编号")
public interface BaseGenerateNoApi {

    String PREFIX = ApiConstants.PREFIX + "/baseGenerateNo";

    // 根据name获取编号
    @GetMapping(PREFIX + "/getBySeqNameAndNum")
    @Operation(summary = "根据名称和编号长度获取编号")
    @Parameters({@Parameter(name = "seqName", description = "名称", example = "H", required = true),
            @Parameter(name = "num", description = "长度", example = "1", required = true)})
    String getBySeqNameAndNum(@RequestParam("seqName") String seqName,@RequestParam("num") int num);
}
